<style type="text/css">
.form-inline .head {
	margin-bottom: 20px;
}
.form-inline .head input {
	margin-left: 20px;	
}
.form-inline .head .select-all {
	margin-bottom: 5px;
}
.form-inline .head label {
	margin-bottom: 0px;
}
</style>
<div class="pageheader">
	<h2>
		<i class="fa fa-inbox"></i>库存管理
	</h2>
	<div class="breadcrumb-wrapper">
		<span class="label">你所在的位置：</span>
		<ol class="breadcrumb">
			<li><a href="/index">ERP管理系统</a></li>
			<li>库存管理</li>
			<li class="active">低库存列表导出</li>
		</ol>
	</div>
</div>
<div class="contentpanel">
<div class="main">
    <form id="print-form" target="_blank" class="form-inline" action="/stock/printlow" method="post">
        <div class="head">
            <a href="/lowstock.csv" class="btn btn-primary">下载到本地</a>
            <input class="select-all btn btn-default" type="checkbox" name="checkall">
            <label>全选</label>
            <input class="print-all btn btn-default" type="submit" value="批量打印">
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>SKU</th>
                        <th>产品名称</th>
                        <th>库存状态（尺码/理论库存  减  库存警告值）</th>
                        <th>是否永不下架</th>
                    </tr>
                </thead>
                <tbody>      
                    <?php if ($this->outStockList):?>	                          
	                <?php foreach ($this->stockListSku as $v):?>
		            <tr>
		                <td><input type="checkbox" name="isprint[]" value="<?php echo $v['sku'];?>">&nbsp;&nbsp;<?php echo $v['sku'];?></td>
			     	    <td><?php echo $v['title'];?></td>
						<td>
						<?php
						foreach ( $v ['stock'] as $_v ) {
							if ($_v ['value'] < $_v ['warning_value']) {
								echo $_v ['size'];
								echo '/' . ($_v ['value'] - $_v ['warning_value']);
		                    }
		                    echo "&nbsp;&nbsp;";
		                }
		                ?>
		                </td>
		                <td><?php echo $v['is_forlong'];?></td>
		            </tr>
		            <?php endforeach;?>
		            <?php endif;?>	
		        </tbody>
            </table>
        </div>
    </form>
</div>
</div>
